Skip to content

Conversation

AlexeyDsov
Copy link
Member

В очередной раз писал кастомные ошибки и надоело писать что-то вроде:

$form->markCustom('id', 3);
$form->addCustomLabel('id', 3, 'here your custom error message');

Хочется добавить 3-ий не обязательный аргумент $label в метод markCustom и если он присутствует, то уж markCustom внутри и вызовет addCustomLabel, т.е. что бы снаружи выглядело вот так:

$form->markCustom('id', 3, 'here your custom error message');

З.Ы. на github наконец пофиксили для php кода, что не надо писать открывающий php тэг, что бы код подсвечивался

…ment "label" to set it without calling special method
AlexeyDsov added a commit that referenced this pull request Sep 26, 2012
Calling methods Form::mark(Custom|Wrong|Missing) add(Custom|Wrong|Missing)Label through one method
@AlexeyDsov AlexeyDsov merged commit 893115b into onPHP:master Sep 26, 2012
@AlexeyDsov
Copy link
Member Author

Замержено в мастер. В 1.0 мержить не стал, но могу сделать, по желанию.

@dovg
Copy link
Member

dovg commented Sep 26, 2012

Плюсую в 1.0, ибо bc не ломается.

@AlexeyDsov
Copy link
Member Author

Добавил в 1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants